Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS .htaccess error

  • This topic is empty.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #44180

    i have been trying to put this .htaccess code,but when i upload it ,it redirects me to the default 404 page.

    what should i do, any help RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$profile.phpu=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$profile.phpu=$1

    #132067
    chrisburton
    Participant

    I’m not experienced with htaccess but what is `phpu`?

    `$profile.phpu`

    #132069
    chrisburton
    Participant

    Googling around I’ve seen it as such:

    RewriteEngine On
    RewriteRule ^([a-zA-Z0-9_-]+)$profile.php?u=$1
    RewriteRule ^([a-zA-Z0-9_-]+)/$profile.php?u=$1

    Notice the `?`.

    #132070
    Archie22is
    Participant

    The above should work

    #132194
    __
    Participant

    yes, there should be a single space.

    Also, you don’t need two rules: just make the trailing slash optional.

    RewriteRule ^([-_a-zA-Z0-9]+/?)$ profile.php?u=$1

    #136419

    Help Me, this is not working as i am having a page profile.php but it give me error after i use the above code in .htaccess further when i remove .htaccess it doesn’t give me error but i have to use profile.php?u=
    Do .htaccess affects with subdomains as i am having subdomain for eg: – rahulkapoor.webege.com!

    #136422

    code is same as that of @traq(above)
    i am not getting any error but i want to use like rahulkapoor.webege.com/rahulkapoor instead of rahulkapoor.webege.com/profile.php?u=rahulkapoor but that’s not working so it leads me to default 404 page.

    #136424

    same as that of @traq(above)

Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘CSS’ is closed to new topics and replies.