Printable Version of Topic

Click here to view this topic in its original format

HTMLHelp Forums _ Web Server Configuration _ .htaccess rewrite and redirection issues

Posted by: advcomputer Jun 30 2017, 07:23 AM

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-11415/drug-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

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)