GET variables in PHP - rewrite?
3 posts
• Page 1 of 1
GET variables in PHP - rewrite?
Hi,
I wonder if anyone can help.
We have a WordPress site and have got rewrites working to a point, hosted on iis6 with isapi_rewrite 3.0 lite.
The developers have a version of our site and all their rewrites work flawlessly but that is hosted on a linux server.
The problem we have is below:
http://blackburn.labpad.co.uk/course/business-administration-and-enterprise-level-1/?section=student-work-examples This is the developers version on the linux server and takes you the student work examples section within that particular course
http://www.blackburn.ac.uk/course/business-administration-and-enterprise-level-1/?section=student-work-examples This is the current live version of the site and if will never show you the student work examples, even if you remove the ?section=xxxxxx from the urls. It will only ever show you the current page. Clicking on the section link on the side won't even bring it up
The rewrite on the linux server is:
The rewrite on the live server is:
We have gone back to our developers but they have just come back with : " I am unsure as to why the GET variables in PHP wouldn't be getting picked up in the URL on a Windows server"
If anyone can please assist we would be most grateful
I wonder if anyone can help.
We have a WordPress site and have got rewrites working to a point, hosted on iis6 with isapi_rewrite 3.0 lite.
The developers have a version of our site and all their rewrites work flawlessly but that is hosted on a linux server.
The problem we have is below:
http://blackburn.labpad.co.uk/course/business-administration-and-enterprise-level-1/?section=student-work-examples This is the developers version on the linux server and takes you the student work examples section within that particular course
http://www.blackburn.ac.uk/course/business-administration-and-enterprise-level-1/?section=student-work-examples This is the current live version of the site and if will never show you the student work examples, even if you remove the ?section=xxxxxx from the urls. It will only ever show you the current page. Clicking on the section link on the side won't even bring it up
The rewrite on the linux server is:
- Code: Select all
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /blackburn.ac.uk/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /blackburn.ac.uk/index.php [L]
</IfModule>
The rewrite on the live server is:
- Code: Select all
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/wp-admin
RewriteRule ^(.*)$ index.php?p=$1 [NC,L]
We have gone back to our developers but they have just come back with : " I am unsure as to why the GET variables in PHP wouldn't be getting picked up in the URL on a Windows server"
If anyone can please assist we would be most grateful
- HeliconAndrew
- Posts: 1264
- Joined: 07 Mar 2012, 10:16
Re: GET variables in PHP - rewrite?
Hello,
Lets try using the following:
This rule means that the resulting request would be: course/business-administration-and-enterprise-level-1/index.php?p=section=student-work-examples. IS it what you're looking for? I tested it, but didn't get results. QSA flag allows to append querystring.
Regards
Andrew
Lets try using the following:
- Code: Select all
Rewriteengine on
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !/wp-admin
RewriteRule ^(.*)$ index.php?p=$1 [QSA,NC,L]
This rule means that the resulting request would be: course/business-administration-and-enterprise-level-1/index.php?p=section=student-work-examples. IS it what you're looking for? I tested it, but didn't get results. QSA flag allows to append querystring.
Regards
Andrew
Re: GET variables in PHP - rewrite?
Fantastic, that now works perfectly on our windows server
thanks for your speedy response!
thanks for your speedy response!
3 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 10 guests