Home HTAccess Rewrite affecting other files in the Root?
Reply: 0

HTAccess Rewrite affecting other files in the Root?

user780 Published in April 20, 2018, 6:05 pm

I'm on a 1and1 shared server containing my other websites.

In the Root I have an HTAccess file Rewriting a photo viewing php file with an ID as a parameter.

RewriteEngine On
RewriteRule ^([^/d]+)\.html?$ /photography/albums/viewphoto.php?id=$1 [QSA,NC,L]

Example: Current URL: http://www.example.com/photography/albums/viewphoto.php?id=C01-A01-P01

Desired URL:

All works for the rewrite of the URLs, but the html files located in the root have stopped including my PHP code functions and variables held in an .inc file.

Am I missing something in making the rewrite specific to a single file or is an option missing on the rewrite?

You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.306733 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO