Unstoppable Domains

Mod_rewrite problem

Spaceship Spaceship
Watch

moondog

Established Member
Impact
23
Trying to get the basics of mod_rewrite going. . . I'd like to rename any urls in this format:

index.php?a=c

to this:

index-X.html

where X is the value of 'c'.

Here is what I have:

RewriteEngine on
RewriteBase /
RewriteRule ^index\-(.*)\.html$ index.php?a=$1 [L]


Yet it is not working.. anybody see anything wrong with this?

-Bob
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
I dont think you can do that, it has to be after the file name. of course i could be wrong.

You could make it like

index.html/c/or just www.mysite.com/c/
 
0
•••
Try it without commenting out the - and .
Code:
RewriteEngine on
RewriteBase /
RewriteRule ^index-(.*).html$ index.php?a=$1 [L]
Also if you want the value of c to be case insensitive add ,NC after the L
Code:
RewriteEngine on
RewriteBase /
RewriteRule ^index-(.*).html$ index.php?a=$1 [L,NC]
 
0
•••
B33R said:
Try it without commenting out the - and .

Still not working :(

-Bob
 
0
•••
It's working fine for me. What is the problem exactly?

 
1
•••
I figured it out.. It was me being dense, yet again ;)

-bob
 
0
•••
Dynadot — .com Registration $8.99Dynadot — .com Registration $8.99

We're social

Unstoppable Domains
Domain Recover
DomainEasy — Zero Commission
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back