Quantcast
Channel: Programming Forums
Viewing all articles
Browse latest Browse all 51036

Get Apache rewritten URL

$
0
0
I've got a problem with my site due to an SEO mod I installed for my forums software, which generates a long set of RewriteRules for .htaccess. By and large, the site is fine, but if I navigate to a forum board nested more than 1 level deep (i.e. a subforum) then the root-pathing algorithm I use doesn't accurately hit the actual root of the site, as it doesn't prepend '../' enough times to the root path variable. This is problematic because the pathing constants that I define in the code are used equally for file inclusion (internally in PHP) as they are for parameterising URL paths for images, css files, scripts, etc (in HTML). I have narrowed it down to the fact that the RewriteRules are creating a URL that has a different nesting level to the unwritten path.

Is there a way to determine (in PHP) the URL of a page after it has been rewritten by Apache RewriteRules? If I can get the rewritten URL, then I'm fine and dandy, otherwise, I'm going to have to figure out a better pathing method for the site ://>/>

Viewing all articles
Browse latest Browse all 51036

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>