The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> .htaccess rewrite and redirection issues
advcomputer
post Jun 30 2017, 07:23 AM
Post #1





Group: Members
Posts: 1
Joined: 30-June 17
Member No.: 26,446



This question already has an answer here:
Redirect, Change URLs or Redirect HTTP to HTTPS in Apache - Everything You Ever Wanted to Know About Mod_Rewrite Rules but Were Afraid to Ask 5 answers
I have a website where the use of mod_rewrite.

RewriteRule ^([^/]*)/([^/]*)\.html$ /?systemdomain=$1&page-slug=$2 [L,QSA]
can generate a url such as

http://xyzdomain.com/ny-sample-lawfirm-114...rug-crimes.html

and this work perfectly without issue.

The physical path of this is located at

/homepages/profiles

Now here is the issue, if I have a url such as;

xyzdomain.com/ny-sample-lawfirm-11415/newdirectory I will get a 404 error even though newdirectory exists (/homepages/profiles/newdirectory)

I will need to get access to

xyzdomain.com/ny-sample-lawfirm-11415/newdirectory
xyzdomain.com/ny-sample-lawfirm-11415/newdirectory/sub1
all which generate a 404. Any way of resolving this via .htaccess.

not sure if i should be modifying the rewrite or add some type of redirection. any help would be appreciated
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
2 User(s) are reading this topic (2 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 19th March 2024 - 12:05 AM